package com.example.clusterclientconsumer;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * <p>
 * </p>
 *
 * @author Zero
 * @since 2019/3/5
 */
@FeignClient(name = "cluster-client-provider", fallback = ExampleServiceFailure.class)
public interface ExampleService {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    String hello(@RequestParam(value = "name") String name);

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    Map<String, Object> test(@RequestParam(value = "name") String name);

}
